package lps.bet.variabilidades.tiposDados.terminalIntegrado;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import lps.bet.basico.web.ControladorBet;
import lps.bet.variabilidades.terminalIntegradoMgr.ITerminalIntegradoGUIMgt;
import lps.bet.variabilidades.terminalMgr.ITerminalMgt;

import org.springframework.web.servlet.ModelAndView;
public class GerenciaTerminalIntegradoGUI extends ControladorBet implements ITerminalIntegradoGUIMgt {

	private SimpleDateFormat sdf;
	public ITerminalMgt interfaceTerminalMgt;
	public GerenciaTerminalIntegradoGUI() {
		sdf = new SimpleDateFormat("dd/MM/yyyy");
	}

	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String operacao = request.getParameter("operacao");
		if (request.getServletPath().equals(
				"/gerenciaTerminalIntegradoGUI.html")) {
			if (operacao == null){
				return mostrarFormularioGUI("", request);
			}
			else if (operacao.equals("buscar")) {
				String dados = request.getParameter("cartaoID");
				return tratarCartao(request,dados);
			} else {
				return mostrarFormularioGUI("", request);
			}
		}else{
		return mostrarFormularioGUI("",request);
		}
	}

	 public ModelAndView tratarCartao(HttpServletRequest request, String dados) {
		return null;
	}

	public ModelAndView mostrarFormularioGUI(String string,
			HttpServletRequest request) {
		return null;
	}

	public SimpleDateFormat getSdf() {
		return sdf;
	}

	public void setSdf(SimpleDateFormat sdf) {
		this.sdf = sdf;
	}

	public ITerminalMgt getInterfaceTerminalMgt() {
		return interfaceTerminalMgt;
	}

	public void setInterfaceTerminalMgt(ITerminalMgt interfaceTerminalMgt) {
		this.interfaceTerminalMgt = interfaceTerminalMgt;
	}
	
	
}
